package com.lihan.GetSeatInLib.Domain.MailModel;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MapKeyColumn;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 
 * @ClassName: MailTemplate
 * @Description: 邮件模板
 * @author ASUS
 * @date 2022年1月16日
 *
 */
@ApiModel("邮件模板")
@Entity
@Table(name = "t_mail")
@GenericGenerator(name = "jpa-uuid",strategy = "uuid")
public class MailTemplate {
	
	@Id
	@ApiModelProperty("邮件类型主键")
	@Column(name = "mail_id")
	@GeneratedValue(generator = "jpa-uuid")
	private String id;
	
	@Column(name = "mail_from",length = 35)
	@ApiModelProperty("邮件来源")
	private String From;
	
	@Column(name = "mail_to",length = 35)
	@ApiModelProperty("邮件去向")
	private String To;
	
	
	@ApiModelProperty("邮件内容")
	@ElementCollection
	@CollectionTable(name = "Context")
	@MapKeyColumn(name = "Key_col")
	@Column(name = "Value_col")
	private Map<String, String> Context = new HashMap<>();
	
	@Column(name = "mail_title",length = 35)
	@ApiModelProperty("邮件标题")
	private String Title;
	
	@Column(name = "mail_status",length = 10)
	@ApiModelProperty("邮件状态")
	private String Status;
	
	@Column(name = "mail_verifyCode",length = 35)
	@ApiModelProperty("邮件验证码")
	private String VerifyCode;
	
	@Column(name = "mail_date")
	@ApiModelProperty("邮件发送日期")
	private Date SendDate;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getFrom() {
		return From;
	}

	public void setFrom(String from) {
		From = from;
	}

	public String getTo() {
		return To;
	}

	public void setTo(String to) {
		To = to;
	}

	

	

	
	public Map<String, String> getContext() {
		return Context;
	}

	public void setContext(Map<String, String> context) {
		Context = context;
	}

	public String getTitle() {
		return Title;
	}

	public void setTitle(String title) {
		Title = title;
	}

	public String getStatus() {
		return Status;
	}

	public void setStatus(String status) {
		Status = status;
	}

	public String getVerifyCode() {
		return VerifyCode;
	}

	public void setVerifyCode(String verifyCode) {
		VerifyCode = verifyCode;
	}

	public Date getSendDate() {
		return SendDate;
	}

	public void setSendDate(Date sendDate) {
		SendDate = sendDate;
	}

	

	public MailTemplate(String id, String from, String to, HashMap<String, String> context, String title, String status,
			String verifyCode, Date sendDate) {
		super();
		this.id = id;
		From = from;
		To = to;
		Context = context;
		Title = title;
		Status = status;
		VerifyCode = verifyCode;
		SendDate = sendDate;
	}

	public MailTemplate() {
	}
	

	
}
